@@ -1,13 +0,0 @@ |
||
| 1 |
-class CreateChains < ActiveRecord::Migration |
|
| 2 |
- def change |
|
| 3 |
- create_table :chains do |t| |
|
| 4 |
- t.integer :runner_id, null: false |
|
| 5 |
- t.integer :target_id, null: false |
|
| 6 |
- |
|
| 7 |
- t.timestamps |
|
| 8 |
- end |
|
| 9 |
- |
|
| 10 |
- add_index :chains, [:runner_id, :target_id], unique: true |
|
| 11 |
- add_index :chains, :target_id |
|
| 12 |
- end |
|
| 13 |
-end |
@@ -1,5 +0,0 @@ |
||
| 1 |
-class RenameRunnerToController < ActiveRecord::Migration |
|
| 2 |
- def change |
|
| 3 |
- rename_column :chains, :runner_id, :controller_id |
|
| 4 |
- end |
|
| 5 |
-end |
@@ -1,5 +0,0 @@ |
||
| 1 |
-class RenameTargetIdToControlTargetId < ActiveRecord::Migration |
|
| 2 |
- def change |
|
| 3 |
- rename_column :chains, :target_id, :control_target_id |
|
| 4 |
- end |
|
| 5 |
-end |
@@ -0,0 +1,13 @@ |
||
| 1 |
+class AddControlLinks < ActiveRecord::Migration |
|
| 2 |
+ def change |
|
| 3 |
+ create_table :control_links do |t| |
|
| 4 |
+ t.integer :controller_id, null: false |
|
| 5 |
+ t.integer :control_target_id, null: false |
|
| 6 |
+ |
|
| 7 |
+ t.timestamps |
|
| 8 |
+ end |
|
| 9 |
+ |
|
| 10 |
+ add_index :control_links, [:controller_id, :control_target_id], unique: true |
|
| 11 |
+ add_index :control_links, :control_target_id |
|
| 12 |
+ end |
|
| 13 |
+end |
@@ -1,5 +0,0 @@ |
||
| 1 |
-class RenameChainsToControlLinks < ActiveRecord::Migration |
|
| 2 |
- def change |
|
| 3 |
- rename_table :chains, :control_links |
|
| 4 |
- end |
|
| 5 |
-end |